package org.thinktube.domani
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;

	public class Footer extends Sprite
	{
		private var _stageWidth:int = 0;
		private var footer_y:int = 0;
		public function Footer(_y:int,_width:int,_height:int)
		{
			_stageWidth = _width;
			footer_y  = _y;
			var footer:Background = new Background(0,_y,_width,_height,0xb0232b);
			var copyright:TextField = drawText("Copyright Domani Casa");
			footer.addChild(copyright);
			this.addChild(footer);
		}
		
		private function drawText(_text:String):TextField
		{
			var _copyright:TextField = new TextField();
			_copyright.width = 300;

			_copyright.x = _stageWidth - _copyright.width;
			_copyright.y = footer_y + 10;
			_copyright.text = _text;
			_copyright.textColor = 0xffffff;
			
			var format1:TextFormat = new TextFormat();
			format1.font = "Arial";
			format1.size = 16;
			_copyright.setTextFormat(format1);
			
			return _copyright;
		}
	}
}